{% block sw_select_result_list %}
<div class="sw-select-result-list">
    <sw-popover
        class="sw-select-result-list-popover"
        :popover-class="popoverClass"
        :z-index="1100"
        :resize-width="popoverResizeWidth"
    >
        <div
            ref="popoverContent"
            class="sw-select-result-list__content"
            :class="{ 'sw-select-result-list__content_empty': isLoading && (!options || options.length <= 0) }"
            @scroll="onScroll"
        >
            <slot name="before-item-list"></slot>

            <ul class="sw-select-result-list__item-list">
                <template v-for="(item, index) in options">
                    <slot
                        name="result-item"
                        v-bind="{ item, index }"
                    ></slot>
                </template>
            </ul>

            <slot name="after-item-list"></slot>

            <div
                v-if="!isLoading && options && options.length < 1"
                class="sw-select-result-list__empty"
            >
                {% block sw_select_result_list_empty_icon %}
                <mt-icon
                    name="regular-search"
                    size="20px"
                />
                {% endblock %}

                {% block sw_select_result_list_empty_text %}
                {{ emptyMessageText }}
                {% endblock %}
            </div>
        </div>
    </sw-popover>
</div>
{% endblock %}
